package com.karst.essentials.chapter03
{
	import flash.events.Event;
	
	import org.papervision3d.objects.primitives.Cone;
	import org.papervision3d.view.BasicView;
	
	internal class ConeExample extends BasicView
	{
		public function ConeExample()
		{
			super() ;
			createView() ;
			startRendering() ;
		}

		private var cone : Cone = null ;
		private function createView() : void
		{
			if( cone == null )
				cone = new Cone( null, 80, 400, 8, 2 ) ;
			scene.addChild( cone ) ;
		}
		
		override protected function onRenderTick(event:Event=null):void
		{
			super.onRenderTick() ;
			if( cone )
			{
				cone.localRotationY++ ;
				cone.localRotationZ++ ;
			}
		}
	}
}